<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		
		<title>大雷商城首页</title>
		<link rel="stylesheet" type="text/css" href="Public/Home/css/index.css"/>
		
		<script src="Public/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/js/adTop.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/js/table.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/js/lbt.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/js/bgImg.js" type="text/javascript" charset="utf-8"></script>
		
	</head>
	<body>
		<!--头部公共头部-->
		<div id="top">
			<div class="mid">
				<div class="left">
					<a href="{{U('Index/index')}}" class="huaWe">大雷官网</a>
					<!-- <a href="" class="power">黑米官网</a> -->
				</div>
				<div class="right">
				<?php 
					if(isset($userData)){
				?>
					<a href="{{U('Person/index',['uid'=>$userData['uid']])}}">{{$userData['username']}}</a>
					<a href="{{U('Login/out')}}">退出登录</a>
					<a href="{{U('Person/index',['uid'=>$userData['uid']])}}">我的订单</a>
				<?php  }else{?>
					<a href="{{U('Login/register')}}">注册</a>
					<a href="{{U('Login/index')}}">登录</a>
					<a href="{{U('Login/index')}}">我的订单</a>

				<?php }?>
				</div>
			</div>
		</div>
		<!--公共头部结束-->
		<!--搜索区域-->
		<div id="search">
			<!--logo-->
			<a href="{{U('Index/index')}}"class="log"></a>
			<!--logo结束-->
			<!--搜索框-->
			<div class="find">
				<form action="{{U('Search/index')}}" method="post">
					<input type="text" class="textIn"  name="search" placeholder="荣耀8"/>
					<input type="submit" class="sub" value="搜索"/>
				</form>	
			</div>
		<!-- 	<script>
				$(function(){
					// 当用户单击搜索的时候 
					$(".sub").click(function(){
						var textIn=$('.textIn').val();
						if(textIn.length>0){
							$.ajax({
								type:'post',
								url:'{{U('Search/oneAjax')}}',
								data:{textIn},
								dataType:'json',
								success:function(phpData){
									if(isset(phpData)){
										location.href="{{U('Search/index')}}"
									}	
								}

							})
						}


					})

					// 当用户按下回车键的时候
					$('.textIn').keydown(function(e){
						if(e.keyCode==13){
							var textIn=$('.textIn').val();
							$.ajax({
								type:'post',
								url:'{{U('Search/oneAjax')}}',
								data:{textIn},
								dataType:'json',
								success:function(phpData){

								}
							})
						}
					})
				})	



			</script> -->


			
			<!--搜索框结束-->
			<!--热词区域-->
			<div class="hotWord">
				<span>热门搜索 :</span>
				{{foreach from="$searchData" value="$v"}}
				<a href="{{U('Detail/index',['gid'=>$v['gid']])}}">{{$v['gname']}}</a>
				{{endforeach}}
			</div>
			<!--热词区域结束-->
			<!--我的商城与购物车-->
			<div class="MyCarStore">
				<!--我的商城-->
				<div class="cover">
					<div class="MyStore">
					<?php 
					if(isset($userData)){
				?>
						<a href="{{U('Person/index')}}">我的商城</a>
						<div class="StoreBot"></div>
						<div class="MyStoreIn"  style="height:100px">
							<span class="login">
								<span>欢迎:</span>
								<a href="{{U('Person/index')}}" class="goIn">{{$userData['username']}}</a>
								<a href="{{U('Login/del')}}" class="resiget">退出</a>
							</span>
							<a href="{{U('Person/index')}}">我的订单</a>
							<a href="{{U('Person/index')}}">待支付</a>
						</div>
				<?php  }else{?>
						<a href="">我的商城</a>
						<div class="StoreBot"></div>
						<div class="MyStoreIn"  style="height:100px">
							<span class="login">
								<span>你好, 请</span>
								<a href="{{U('Login/index')}}" class="goIn">登录</a>
								<a href="{{U('Login/register')}}" class="resiget">注册</a>
							</span>
							<a href="{{U('Login/index')}}">我的订单</a>
							<a href="{{U('Login/index')}}">待支付</a>
						
						</div>

				<?php }?>
					
					</div>
				</div>
				
				<!--我的商城结束-->
				<!--我的购物车开始-->
				<div class="MyCar">
				<?php  if(isset($_SESSION['cart']['goods'])){?>
				
					<a href="{{U('Gwc/carOne')}}" class="car">我的购物车<b style="color:white;width:20px;background-color:#CA141D; border-radius:50px;  position:relative;top:-20px">&nbsp;{{count($_SESSION['cart']['goods'])}}&nbsp;</b></a>
					<div class="CarBot"></div>
					<div class="CarIn">
						<div class="Car">
						</div>
						<span style="font-size:20px;color:#D25527">购物车有货，请速下单</span>				
						<img src="Public/Home/images/pp.jpg"/>
					</div>
				<?php }else{?>
				<a href="{{U('Gwc/carOne')}}" class="car">我的购物车</a>
					<div class="CarBot"></div>
					<div class="CarIn">
						<div class="Car">
						</div>
						<span>您的购物车是空的，赶紧选购吧！</span>				
						
					</div>
				<?php }?>
				</div>
				<!--我的购物车结束-->
			</div>
			<!--我的商城与购物车结束-->
			<!--二维码区域-->
			<div class="QrCode">
				<!-- <ul>
					<li class="Code CodeOne color"></li>
					<li class="Code CodeTwo "></li>
				</ul> -->
				
				<!--专享周三荣耀专场-->
				<!-- 
				<img src="Public/Home/images/qrcode_vmall_app01.png" class="threeYear con"/>
				<img src="Public/Home/images/qrcode_vmall_wechat01.jpg" class="wexi con"/> -->
				
				<!--微信扫码关注我们-->
				
			</div>
		<!--二维码区域结束-->
		</div>
		<!--搜索区域结束-->
		<!--导航区域-->
		<style type="text/css">
			#center .all .navMenu  a:hover{
				text-decoration: underline;
				color: #D84C29;
			}
		</style>
		<div id="nav">
			<div id="center">
				<ul>
					<li class="all">
						<a href="">全部商品</a>
						<div class="navMenu" >
							<!--第一个-->
							{{foreach from='$cateData' value='$v'}}
							
								<div class="navOne">
									
									<p><a href="{{U('List/index',['cid'=>$v['cid']])}}">{{$v['cname']}}</a></p>
									
									{{foreach from="$v['two_three']" value="$vv"}}
										<a href="{{U('List/index',['cid'=>$vv['cid']])}}" style=""><span>{{$vv['cname']}}</span></a>
									{{endforeach}}
									
									<div class="box">
										<ul class="top">
											
											{{foreach from="$v['twomenu']" value="$vvv"}}
												<p>
													<a href="{{U('List/index',['cid'=>$vvv['cid']])}}">{{$vvv['cname']}}</a>
												</p>
											{{endforeach}}
											
										</ul>
										
										<div class="suggest">
											<span>推荐商品</span>
										</div>
										<ul class="bot">
											
											{{foreach from="$v['twomenu']" value="$vvvv"}}
											<!--if判断中的非空判断，空判断-->
												{{if value="!empty($vvvv['threemenu'])"}}
													{{foreach from="$vvvv['threemenu']" value="$v6"}}
														<p>
															<a href="{{U('List/index',['cid'=>$vvvv['cid']])}}">{{$v6['cname']}}</a>
														</p>
													{{endforeach}}
												{{endif}}
											{{endforeach}}
											
										</ul>
									</div>
								</div>
							<!--第一个结束-->
							{{endforeach}}
						</div>
					</li>	
					<li><a href="">首 页</a></li>
					
					{{foreach from="$cateData" value="$v"}}
						<li><a href="{{U('List/index',array('cid'=>$v['cid']))}}">{{$v['cname']}}</a></li>
					{{endforeach}}	
					
				</ul>
			</div>
		</div>
		<!--导航区域结束-->
		
		
		
		<!--轮播图开始-->
		<div id="div1">
			<ul>
		    	<li><a href="javascript:;"><img src="Public/Home/images/l1.jpg" /></a></li>
		        <li><a href="javascript:;"><img src="Public/Home/images/l2.jpg" /></a></li>
		        <li><a href="javascript:;"><img src="Public/Home/images/l3.jpg" /></a></li>
		    </ul>
		    <div id="btn">
		    	<a href="javascript:;" class="active"></a>
		        <a href="javascript:;"></a>
		        <a href="javascript:;"></a>
		    </div>
		</div>
		<!--轮不播图结束-->


		<!--热卖区域-->
		<div id="hotBox"   >
		
			<a href="{{U('Detail/index',['gid'=>$hotData[0]['gid']])}}"   style="background-color:white">
				<img    style="width:222px;height:222px;" src="{{$hotData[0]['pic']}}"/>
				<h1>{{$hotData[0]['gname']}}</h1>
				<span class="s1">美的与众不同</span>
				<span class="s2">{{$hotData[0]['desc']}}</span>
				<span class="mony">¥{{$hotData[0]['shopprice']}}</span>
				<span class="byNow">立即查看</span>
			</a>
			<a href="{{U('Detail/index',['gid'=>$hotData[1]['gid']])}}"   style="background-color:white">
				<img    style="width:222px;height:222px" src="{{$hotData[1]['pic']}}"/>
				<h1>{{$hotData[1]['gname']}}</h1>
				<span class="s1">美的与众不同</span>
				<span class="s2">{{$hotData[1]['desc']}}</span>
				<span class="mony">¥{{$hotData[1]['shopprice']}}</span>
				<span class="byNow">立即查看</span>
			</a>
			<a href="javascript:;">
				<img src="Public/Home/images/6.jpg"/>
			</a>
			<a href="{{U('Detail/index',['gid'=>$hotData[2]['gid']])}}"  style="background-color:white">
				<img    style="width:222px;height:222px" src="{{$hotData[2]['pic']}}"/>
				<h1>{{$hotData[2]['gname']}}</h1>
				<span class="s1">美的与众不同</span>
				<span class="s2">{{$hotData[2]['desc']}}</span>
				<span class="mony">¥{{$hotData[2]['shopprice']}}</span>
				<span class="byNow">立即查看</span>
			</a>
			<a href="{{U('Detail/index',['gid'=>$hotData[3]['gid']])}}"  style="background-color:white">
				<img    style="width:222px;height:222px" src="{{$hotData[3]['pic']}}"/>
				<h1>{{$hotData[3]['gname']}}</h1>
				<span class="s1">美的与众不同</span>
				<span class="s2">{{$hotData[3]['desc']}}</span>
				<span class="mony">¥{{$hotData[3]['shopprice']}}</span>
				<span class="byNow">立即查看</span>
			</a>
			
			<div class="tabs">
				<!--顶部-->
				<div class="adTop">
					<span class="topLeft same bgcolor">公告</span>
					<span class="topRight same">评测</span>
					<ul>
						<li style="display: block;">
							<a href="javascript:;">震撼首发荣耀 NOTE8 预约赢大奖</a>
							<a href="javascript:;">荣耀畅玩5新品上市 评价赢好礼</a>
							<a href="javascript:;">实名认证获专属特权攻略</a>
							<a href="javascript:;">Vmall 购机攻略</a>
							<a href="javascript:;">Vmall电子发票上线啦</a>
						</li>
						<li class="one">
							<a href="javascript:;"> 流滑得让你爱不释手 荣耀V8全面评测</a>
							<a href="javascript:;">荣耀畅玩5C手机上手评测:更贴心的用机体验</a>
							<a href="javascript:;">时尚新商务 HUAWEI MateBook深度评测</a>
							<a href="javascript:;">能打电话的智能手环 华为手环 B3 评测</a>
							<a href="javascript:;">华为P9真机上手评测：如何做到时尚且强大</a>
						</li>
					</ul>
				</div>
				<!--顶部结束-->
				<div class="adBot">
					
				</div>
			</div>
		</div>
		<!--热卖区域 结束-->
		<!--bg广告图片区域-->
		<div id="cover">
			<div id="bgImg">
				<img src="Public/Home/images/ad1.jpg" alt="" />
				<img src="Public/Home/images/ad2.jpg" alt="" />
				<img src="Public/Home/images/ad3.jpg" alt="" />
			</div>
			<ul>
				<li class="coverDot"></li>
				<li></li>
				<li></li>
			</ul>
		</div>
		
		
		
		<!-- 楼层循环开始 -->

		{{foreach from="$breadData"  key="$k"  value="$v"}}
		<div id="Title">
			<div class="colorleft"></div>
			<h3><a href="{{U('List/index',['cid'=>$v['cid']])}}">{{$v['cname']}}</a></h3>
			<span>精品{{$v['cname']}}</span>
			<ul>
				{{foreach from="$v['twomenu']"  value="$vv"}}
				<li><a href="{{U('List/index',['cid'=>$vv['cid']])}}">{{$vv['cname']}}</a></li>
				{{endforeach}}
			</ul>
		</div>
		<div id="content">
			{{foreach from="$showGoodsData[$k]" key="$kk" value="$vv"}}
				{{if value="$kk eq 0"}}
					<div   style="background-color:white">
						<img src="{{$vv['pic']}}"      style="width:222px;height:222px;" />
						<a href="{{U('Detail/index',['gid'=>$vv['gid']])}}">{{$vv['gname']}}</a>
						<span class="nature">{{$vv['desc']}}</span>
						<span class="money">商城最精致产品</span>
						<span class="buy">¥{{$vv['shopprice']}}</span>
						<span class="buyNow"><a href="{{U('Detail/index',['gid'=>$vv['gid']])}}">立即查看</a></span>
					</div>
				{{else}}
					<div  style="background-color:white">
						<a href="{{U('Detail/index',['gid'=>$vv['gid']])}}">
							<center><img src="{{$vv['pic']}}"    style="width:222px;height:222px;"/></center>
							<span class="nature"  style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100px;margin-left:40px">{{$vv['gname']}} <b>{{$vv['desc']}}</b></span>
							<span class="money">¥{{$vv['shopprice']}}</span>
						</a>
					</div>
				{{endif}}
			{{endforeach}}	
		</div>
		{{endforeach}}
		<!--楼层循环结束-->
		
		
		
		
		<!--结束条幅-->
		<!-- <a href="" id="lastAd"></a> -->
		<!--结束条幅结束-->
		
		<!--微信qq微博手机客户端-->
		<div id="contentWe">
			
		</div>
		<div id="xian">
				
		</div>
		<div id="aboutWe">
			<p>
				<i class="iconfont">&#xe600;</i>
				<span>500强企业 品质保证</span>
			</p>
			<p>
				<i class="iconfont">&#xe691;</i>
				<span>7天退货 15天换货</span>
			</p>
			<p>
				<i class="iconfont">&#xf0082;</i>
				<span>99元起免运费</span>
			</p>
			<p>
				<i class="iconfont">&#xe62a;</i>
				<span>448家维修网点 全国联保</span>
			</p>
		</div>
		<!--微信qq微博手机客户端结束-->
	<!--站点公告-->
		<div id="webSet">
			<span>Copyright © 2012-2016 ***** 版权所有 保留一切权利</span>
			<div class="webOne">
				<ul>
					<li>******* 32011402010009号</li>
					<li>*******09062682号-9</li>
					<li>**********：苏B2-20130048</li>
					<li>********：*****[2012]0401-019号</li>
					<li>********：*****[2012]0401-019号</li>
				</ul>
				
			</div>
		</div>
		<!--站点公告结束-->
		<div id="lastImg">
			<!-- <img src="Public/Home/images/b1.png" alt="" />
			<img src="Public/Home/images/d.png" alt="" />
			<img src="Public/Home/images/到.png" alt="" /> -->
		</div>
	</body>
</html>

















































